//
//  FlowCollectionViewCell.m
//  Car
//
//  Created by 何晓文 on 15/9/23.
//  Copyright © 2015年 朱鸿儒. All rights reserved.
//

#import "FlowCollectionViewCell.h"

@implementation FlowCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
	
	if (self = [super initWithFrame:frame]) {
		
		
		self.picView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, 180*0.6)];
		self.picView.backgroundColor = [UIColor greenColor];
		[self addSubview: self.picView];
		
		//标题
		self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width * 0.1,  self.height + 10 , self.width * 0.9,self.picView.height * 0.2)];
		self.titleLabel.textColor = [UIColor buttermilkColor];
		self.titleLabel.backgroundColor = [UIColor blackColor];
		self.titleLabel.textAlignment = NSTextAlignmentCenter;
		self.titleLabel.numberOfLines = 0;
		self.titleLabel.font = [UIFont systemFontOfSize:9];
		[self.contentView   addSubview:self.titleLabel];
		
		self.layer.borderWidth = 1;
		self.layer.shadowColor = [UIColor blackColor].CGColor;
		self.layer.shadowOffset = CGSizeMake(3, 3);
		self.layer.cornerRadius = 1;
		self.layer.shadowOpacity = 0.6;
		self.contentView.clipsToBounds = YES;
	}
	return self;
}
- (void)setBeauty:(BeautyModel *)beauty {
	_beauty = beauty;
	[self.picView sd_setImageWithURL:[NSURL URLWithString:beauty.smallpic] placeholderImage:[UIImage imageNamed:@"image3"]];
	self.titleLabel.text = beauty.title;
	
	
}
@end
